package com.baizhi.dto.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
@Data
public class StudentDTO {
    @NotBlank(message="用户名不能为空")
    private String userName;
    @NotBlank(message="姓名不能为空")
    private String name;
    @NotBlank(message="性别不能为空")
    private String sex;
    @NotBlank(message = "班级不能为空")
    private String gradeId; //班级id
    @NotBlank(message="地址不能为空")
    private String address;


    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date enrollYear; //入学年份
    @NotBlank(message="电话不能为空")
    private String phone;
    @NotBlank(message="紧急联系人不能为空")
    private String emergencyContact; //紧急联系人
    @NotBlank(message = "紧急联系人电话不能为空")
    private String emergencyContactPhone; //紧急联系人电话
    @NotBlank(message="密码不能为空")
    private String password;

}
